//
//  HcolorPicker.h
//  HMusicPlayer
//
//  Created by Hament on 14/10/14.
//  Copyright (c) 2014年 HJ. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@protocol HcolorPickerDelegate <NSObject>
- (void)selectColor:(NSString*)colorv;
- (void)colorDynamicChange:(NSColor*)color;
@end

@class ColorView;
@interface HcolorPicker : NSViewController {

    IBOutlet NSSlider *red;
    IBOutlet NSSlider *green;
    IBOutlet NSSlider *blue;
    IBOutlet NSSlider *white;
    IBOutlet NSSlider *alpha;
    
    IBOutlet ColorView *colorView;
    IBOutlet NSTextField *colorCode;

}


@property (assign) IBOutlet NSWindow *window;
@property (nonatomic) CGFloat redStepSize;
@property (readwrite) CGFloat greenStepSize;
@property (readwrite) CGFloat blueStepSize;
@property (readwrite) CGFloat whiteStepSize;
@property (readwrite) CGFloat alphaStepSize;
@property (weak,nonatomic) id<HcolorPickerDelegate> delegate;
@property (nonatomic,strong) IBOutlet NSTabView * tabview;
@property (nonatomic,strong) IBOutlet NSTabViewItem * rgbtabviewItem;



- (IBAction)sliderChanged:(id)sender;

-(IBAction)save:(NSButton*)sender;
-(void)configWithColor:(NSColor*)color;//外部调用

@end
